package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `gorm:"type:char(11)"json:"tel"`
	Password string `gorm:"type:varchar(32)"json:"password"`
}

type Shop struct {
	gorm.Model
	Img   string  `gorm:"type:varchar(500)"json:"img"`
	Name  string  `gorm:"type:varchar(30)"json:"name"`
	Price float64 `gorm:"type:decimal(10,2)"json:"price"`
	Num   int     `gorm:"type:int(11)"json:"num"`
}

type Cart struct {
	gorm.Model
	ShopId   int     `gorm:"type:int(11)"json:"shopId"`
	Quantity int     `gorm:"type:int(11)"json:"quantity"`
	Amount   float64 `gorm:"type:decimal(10,2)"json:"amount"`
}
